// reducer 就是纯函数  redux 规定的这是有利于性能优化的

// 就是这种简单的函数   但是因为页面数据较多 方法也会很多 我们需要把reducer进行拆分 
import { combineReducers } from 'redux';

// 每个模块 都有自己的reducer 所以 到时 都要导入进来
import { reducer as recommendReducer } from '../pages/discover/c-pages/recommend/store'
import { reducer as palyerReducer } from '../pages/player/store';

const cReducer = combineReducers({
    recommend: recommendReducer,
    palyer:palyerReducer
});
  
export default cReducer;

// function reducer(state = defaultState, action) {
//     switch (action.type) { 
//       case ADD_NUMBER:
//         return { ...state, counter: state.counter + action.num };
//       case DECREMENT:
//         return { ...state, counter: state.counter - 1 };
//       default:
//         return state;
//     }
//   }